<template>
  <div class="list-item editingClass editing"><!--最外层容器-->
    <label class="checkbox"><!--item.checked-->
        <input type="checkbox" v-model="item.checked">
        <span class="checkbox-custom"></span>
    </label>
    <input type="text" v-model="item.text" placeholder="写点啥吧">
    <a class="delete-item"><!--删除图标-->
        <span class="icon-trash"></span>
    </a>
  </div>
</template>

<script>
export default {
 //子组件显式的用props选项声明它期待获取的数据   
  props:{
    item: {
      type: Object,
      default: () => {
        return {
          checked:false,
          text:'你好，世界'
        }
      }
    }
  }
};
</script>

<style lang="less">
@import '../common/style/list-items.less';
</style>


